<?php

namespace McWin\Model;
use Common\Model\CommonModel;

/*
 * 	内蒙古赔率数据.
 */

class NmgK3OddsModel extends CommonModel {

	protected $trueTableName = 'c_odds_nmg_k3';
	
	/*
	*	读取 赔率 数据
	*/
	public function get_odds(){
		$dd = $this -> select();
		return $dd;		
	}

	/**
	 * 读取赔率(具体某一个数字的赔率)
	 * @param  [type] $wanfa [description]
	 * @param  [type] $h     [description]
	 * @return [type]        [description]
	 */
	function read_odds($wanfa,$h){
		$h = intval($h);
		$sql	=	"select * from c_odds_nmg_k3 where type='" . $wanfa . "' limit 1";
		$query	=	$this -> query($sql);
		$t		=	$query -> fetch_array();
		return $t["h".$h.""];
	}
	

}